package com.first;

import java.util.Random;

public class 随机生成数求和 {
    public static void main(String[] args) {

        Random r = new Random();

        int[] arr = new int[6];

        for (int i = 0; i < 6; i++) {
            arr[i] = r.nextInt(101);
        }

        int sum = 0;

        for (int i = 0; i < 6; i++) {
            sum += arr[i];
        }
        System.out.println(sum);
    }
}
